package com.eshop.modules.order.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

@TableName("store_order_cart_info")
public class StoreOrderCartInfo implements Serializable
{
    @TableId
    private Long id;
    private Long oid;
    private Long cartId;
    private Long productId;
    private String cartInfo;
    @TableField("`unique`")
    private String unique;
    
    public void copy(final StoreOrderCartInfo source) {
        BeanUtil.copyProperties((Object)source, (Object)this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public Long getId() {
        return this.id;
    }
    
    public Long getOid() {
        return this.oid;
    }
    
    public Long getCartId() {
        return this.cartId;
    }
    
    public Long getProductId() {
        return this.productId;
    }
    
    public String getCartInfo() {
        return this.cartInfo;
    }
    
    public String getUnique() {
        return this.unique;
    }
    
    public void setId(final Long id) {
        this.id = id;
    }
    
    public void setOid(final Long oid) {
        this.oid = oid;
    }
    
    public void setCartId(final Long cartId) {
        this.cartId = cartId;
    }
    
    public void setProductId(final Long productId) {
        this.productId = productId;
    }
    
    public void setCartInfo(final String cartInfo) {
        this.cartInfo = cartInfo;
    }
    
    public void setUnique(final String unique) {
        this.unique = unique;
    }
    
    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof StoreOrderCartInfo)) {
            return false;
        }
        final StoreOrderCartInfo other = (StoreOrderCartInfo)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0065: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0065;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$oid = this.getOid();
        final Object other$oid = other.getOid();
        Label_0102: {
            if (this$oid == null) {
                if (other$oid == null) {
                    break Label_0102;
                }
            }
            else if (this$oid.equals(other$oid)) {
                break Label_0102;
            }
            return false;
        }
        final Object this$cartId = this.getCartId();
        final Object other$cartId = other.getCartId();
        Label_0139: {
            if (this$cartId == null) {
                if (other$cartId == null) {
                    break Label_0139;
                }
            }
            else if (this$cartId.equals(other$cartId)) {
                break Label_0139;
            }
            return false;
        }
        final Object this$productId = this.getProductId();
        final Object other$productId = other.getProductId();
        Label_0176: {
            if (this$productId == null) {
                if (other$productId == null) {
                    break Label_0176;
                }
            }
            else if (this$productId.equals(other$productId)) {
                break Label_0176;
            }
            return false;
        }
        final Object this$cartInfo = this.getCartInfo();
        final Object other$cartInfo = other.getCartInfo();
        Label_0213: {
            if (this$cartInfo == null) {
                if (other$cartInfo == null) {
                    break Label_0213;
                }
            }
            else if (this$cartInfo.equals(other$cartInfo)) {
                break Label_0213;
            }
            return false;
        }
        final Object this$unique = this.getUnique();
        final Object other$unique = other.getUnique();
        if (this$unique == null) {
            if (other$unique == null) {
                return true;
            }
        }
        else if (this$unique.equals(other$unique)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof StoreOrderCartInfo;
    }
    
    @Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $oid = this.getOid();
        result = result * 59 + (($oid == null) ? 43 : $oid.hashCode());
        final Object $cartId = this.getCartId();
        result = result * 59 + (($cartId == null) ? 43 : $cartId.hashCode());
        final Object $productId = this.getProductId();
        result = result * 59 + (($productId == null) ? 43 : $productId.hashCode());
        final Object $cartInfo = this.getCartInfo();
        result = result * 59 + (($cartInfo == null) ? 43 : $cartInfo.hashCode());
        final Object $unique = this.getUnique();
        result = result * 59 + (($unique == null) ? 43 : $unique.hashCode());
        return result;
    }
    
    @Override
    public String toString() {
        return "StoreOrderCartInfo(id=" + this.getId() + ", oid=" + this.getOid() + ", cartId=" + this.getCartId() + ", productId=" + this.getProductId() + ", cartInfo=" + this.getCartInfo() + ", unique=" + this.getUnique() + ")";
    }
}
